# Lagrange identity.
Suppose $K$ is a commutative ring and $a = (a_{1},\ldots,a_{n}), b = (b_{1},\ldots,b_{n})\in K^{n}$, then we have $$
\Vert a \Vert^{2} \Vert b \Vert ^{2} - (a \cdot b)^{2} = \sum_{1\le i < j\le n} (a_{i}b_{j}-a_{j}b_{i})^{2}
$$
When $n = 2$ this is easily verified. Take $a = (p,q)$ and $b = (r,s)$, then $$
\begin{align*}
(p^{2}+q^{2})(r^{2}+s^{2}) & = p^{2}r^{2}+p^{2}s^{2}+q^{2}r^{2}+q^{2}s^{2} \\
& = (pr + qs)^{2} - 2pqrs + p^{2}s^{2} +q^{2}r^{2} \\
& = (pr + qs)^{2} + (ps - qr)^{2}
\end{align*}
$$
Application. If we look at two complex numbers $z = a+ ib$ and $w = c + id$, then we have $$
|z||w| =(a^{2}+b^{2})(c^{2}+d^{2})
$$ and $$
|zw| = |(ac-bd) + i(ad + bc)| = (ac - bd)^{2} + (ad + bc)^{2}
$$So by Lagrange identity, we have $$
|z| |w| = |z w|.
$$